<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="../../js/mui.min.js"></script>
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../css/share/common.css" />
		<link rel="stylesheet" href="../../css/share/orderCommon.css" />
		<style>
			#main {
				margin-top: 48px;
			}
			
			.pj-y {
				display: none;
			}
			
			.btn-true {
				color: gray;
				border-color: gray;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav" id="header">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left header-left"></a>
			<h1 id="title" class="mui-title">订单评价</h1>
		</header>
		<div class="mui-content" ng-App="" ng-controller="orderProject" ng-cloak>
			<div class="main_container" ng-repeat="goods in goodsList">
				<div class="main_con_title clearfix addborder">
					<span class="main_con_name pull_left">{{order.shopName}}</span>
					<span class="main_con_cotact pull_right"> <span class="main_con_state">交易成功</span></span>
				</div>
				<div class="main_content box_orient_h addborder" style="clear: both;">
					<div class="main_content_img">
						<img src={{goods.picture}}>
					</div>
					<div class="main_content_con flex-b">
						<div class="main_content_con_title">
							{{goods.name}}
						</div>
						<div class="main_content_con_design">
							<span class="main_design_color"> <a ng-hide="goods.ngcolor">颜色:{{goods.speccolor}};</a><a ng-hide="goods.ngsize">尺寸:{{goods.specsize}};</a><a ng-hide="goods.ngspec">规格:{{goods.specspec}};</a><a ng-hide="goods.ngmodel">型号:{{goods.specmodel}};</a></span>
						</div>
						<div class="main_con_price">
							￥{{goods.price}}
						</div>
						<div class="main_con_Num">
							X{{goods.number}}
						</div>
					</div>

				</div>
				<div class="main_operate addborder ">
					<button class="btn btn_add btn-{{goods.disabled}}" ng-click="orderPj(goods.orderdetailid,goods.disabled)">
									商品评价
								</button>
				</div>
			</div>
		</div>
		<script type="text/javascript" src="../../js/common.js"></script>
		<script type="text/javascript" src="../../js/angular.min.js"></script>
		<script type="text/javascript" src= "../../js/localData.js"></script>
		<script>
			function orderProject($scope) {
				var orders = eval('(' + readData(localStorage.order) + ')');
				$scope.order = orders;
				for (var i in orders.list) {
					if (orders.list[i].iscomment == "y") {
						orders.list[i].disabled = "true";
					} else {
						orders.list[i].disabled = "false";
					}
				}
				$scope.goodsList = orders.list;
				$scope.orderPj = function(orderdetailid, status) {
					if (status == "true") {
						return;
					} else {
						orders['orderdetailid'] = orderdetailid;
						localStorage.order = writeData(JSON.stringify(orders));
						OpenNewWin({
							url: "orderJudge.html",
							id: "orderJudge.html"
						});
					}
				}
			};
			window.addEventListener("reloadthis",function(){
				location.reload();
			},false)
		</script>
	</body>

</html>